//go:build ignore

package main

import (
	"fmt"
	"math"
)

type MyStructure struct {
	a, b float64
}

// 方法就是带接收类型的函数
func (v MyStructure) myABS() float64 {
	return math.Sqrt(v.a*v.a + v.b*v.b)
}

func myNewABS(v MyStructure) float64 {
	return math.Sqrt(v.a*v.a + v.b*v.b)
}

func main() {
	v := MyStructure{3, 4}
	fmt.Println(v.myABS())
	fmt.Println(myNewABS(v))
}
